package com.sky.mapper;

import com.sky.autofill.AutoFill;
import com.sky.dto.ShoppingCartDTO;
import com.sky.entity.OrderDetail;
import com.sky.entity.ShoppingCart;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {

    void addShoppingCart(ShoppingCart shoppingCartDTO);

    List<ShoppingCart> getShoppingCartList(Long userId);

    Integer getDishCount(Long dishId,Long userId);

    void updateDishNumber(Long dishId, Long userId);

    Integer getSetmealCount(Long setmealId, Long userId);

    void updateSetmealNumber(Long setmealId, Long userId);

    void deleteShoppingCart(Long userId);

    Integer getDishNumber(Long dishId, Long userId);

    void deleteShoppingCartByDishId(Long dishId, Long userId);

    void updateShoppingCartByDishId(Long dishId, Long userId);

    void updateShoppingCartBySetmealId(Long setmealId, Long userId);

    void deleteShoppingCartBySetmealId(Long setmealId, Long userId);

    Integer getSetmealNumber(Long setmealId, Long userId);

    List<ShoppingCart> getByUserId(Long userId);
}
